from zope.interface import Interface

class ProcessingException(Exception):
    """An exception thown during processing.
    """

class AcceptedException(ProcessingException):
    """The trackback should be accepted.
    """

class DubiousException(ProcessingException):
    """The trackback should be marked as dubious.
    """

class RejectedException(ProcessingException):
    """The trackback should be rejected.
    """


class ITrackbackProcessor(Interface):
    """
    """

    def process(trackback, request):
        """Process the IWorkflowedTrackback instance, raising one of
        AcceptedException, DubiousException, or RejectedException to indicate
        the action that should be taken by the calling processor.  It is not
        required that any of these exceptions be raised.
        """

    def isEnabled():
        """Return True if the processor is currently enabled, False otherwise.
        """

    def enable():
        """Enable this processor.
        """

    def disable():
        """Disable this processor.
        """
